﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            ECGA a = new ECGA(50, 30);

            string path = "C://notowania//KGHM.mst";
            DateTime dateFrom = new DateTime(2001, 01, 01);
            DateTime dateTo = new DateTime(2010, 12, 17);
            decimal cash = 9000; // mamy 2 razy tyle, tyle w gotówce + tyle samo w akcjach

            a.doTheEvolution(dateFrom, dateTo, path, cash);

            DateTime dateFrom2 = new DateTime(2010, 1, 1);
            DateTime dateTo2 = new DateTime(2010, 12, 1);

            Console.WriteLine("Symulacja: " + a.simulate_best_expert(dateFrom2, dateTo2, path, cash));

        }
        
        // wynik: 8K, 9K, 10K, 11K
        // sym: 2.5 K
        static void mini_test1()
        {
            Algorithm a = new Algorithm(80, 50, 0.1, 0.35, 0.15, 0.15, 0.35, 0.1, 0.25, 0.20, 0.45);

            string path = "C://notowania//PRAGMAINK.mst";
            DateTime dateFrom = new DateTime(2008, 05, 28);
            DateTime dateTo = new DateTime(2010, 1, 1);
            decimal cash = 8000; // mamy 2 razy tyle, tyle w gotówce + tyle samo w akcjach

            Console.WriteLine(a.doTheEvolution(dateFrom, dateTo, path, cash).First.ToString());

            DateTime dateFrom2 = new DateTime(2010, 1, 1);
            DateTime dateTo2 = new DateTime(2010, 12, 10);

            Console.WriteLine("Symulacja: " + a.simulate_best_expert(dateFrom2, dateTo2, path, cash));
        }


        // wyniki: 31 K, 44 K, 64 K 
        // symulacja: 15,6
        static void mini_test2()
        {
            Algorithm a = new Algorithm(30, 50, 0.1, 0.35, 0.15, 0.15, 0.35, 0.1, 0.25, 0.20, 0.45);

            string path = "C://notowania//PBG.mst";
            DateTime dateFrom = new DateTime(2004, 8, 2);
            DateTime dateTo = new DateTime(2010, 1, 1);
            decimal cash = 8000; // mamy 2 razy tyle, tyle w gotówce + tyle samo w akcjach

            Console.WriteLine(a.doTheEvolution(dateFrom, dateTo, path, cash).First.ToString());

            DateTime dateFrom2 = new DateTime(2010, 1, 1);
            DateTime dateTo2 = new DateTime(2010, 12, 10);

            Console.WriteLine("Symulacja: " + a.simulate_best_expert(dateFrom2, dateTo2, path, cash));
        }
    }
}
